﻿namespace VM.Common.Enums
{

    /// <summary>
    /// 流程类型
    /// </summary>
    public enum eProjectType
    {
        /// <summary>
        /// 流程
        /// </summary>
        Process,
        /// <summary>
        /// 方法
        /// </summary>
        Method,
        /// <summary>
        /// 文件夹
        /// </summary>
        Folder,
    }

    [Serializable]
    public enum eProjectAutoRunMode
    {
        主动执行 = 0,
        调用执行 = 1,
    }

    [Serializable]
    public enum PLCDataType
    {
        ABCD = 0,
        BADC,
        CDAB,
        DCBA,
    }

    [Serializable]
    public enum PLCDoubleDataLengthEnum
    {
        _32位 = 1,
        _64位 = 2,
    }

    [Serializable]
    public enum PLCIntDataLengthEnum
    {
        _16位 = 0,
        _32位 = 1,
        _64位 = 2,
    }

    [Serializable]
    public enum PLCFunctionCodeEnum
    {
        _01 = 0,
        _02 = 1,
        _03 = 2,
        _04 = 3,
    }

    public enum eMsgType
    {
        /// <summary>
        /// 成功
        /// </summary>
        Success,
        /// <summary>
        /// 消息
        /// </summary>
        Info,
        /// <summary>
        /// 警告
        /// </summary>
        Warn,
        /// <summary>
        /// 报错(不置位报警标志，设备可以继续运行)
        /// </summary>
        Error,
        /// <summary>
        /// 报警(置位报警标志，设备不能继续运行)
        /// </summary>
        Alarm,
    }

    public enum eRunStatus
    {
        /// <summary>
        /// 运行成功
        /// </summary>
        OK = 0,
        /// <summary>
        /// 运行失败
        /// </summary>
        NG = 1,
        /// <summary>
        /// 未运行
        /// </summary>
        NotRun = 2,
        /// <summary>
        /// 运行中
        /// </summary>
        Running = 3,
    }

    /// <summary>通过:指定,文件,相机获取图片 </summary>
    public enum eImageSource
    {
        指定图像,
        文件目录,
        相机采集
    }

    /// <summary>
    /// 相机触发源
    /// </summary>
    [Serializable]
    public enum mTriggerSource
    {
        连续模式,
        触发模式,
    }

    /// <summary>
    /// 海康相机触发模式
    /// </summary>
    [Serializable]
    public enum HikTrigMode
    {
        软触发,
        计数器,
        线触发0,
        线触发2
    }

    /// <summary>
    /// 触发模式
    /// </summary>
    [Serializable]
    public enum eTrigMode
    {
        软触发,
        //计数器,
        //线触发0,
        //线触发2
    }

    /// <summary>
    /// 改变参数类型
    /// </summary>
    [Serializable]
    public enum ChangType
    {
        曝光,
        触发,
        宽度,
        高度,
        增益
    }

    /// <summary>
    /// 流程状态
    /// </summary>
    [Serializable]
    public enum eRunMode
    {
        None = 0,
        /// <summary>
        /// 运行一次
        /// </summary>
        RunOnce = 1,
        /// <summary>
        /// 循环运行
        /// </summary>
        RunCycle = 2,
    }

    public enum eSearchRegion
    {
        矩形1,
        矩形2,
        链接区域
    }

    /// <summary>
    /// 操作类型：加载，增加，删除
    /// </summary>
    public enum eOperateType
    {
        Add, Load, Remove, Clear
    }

    [Serializable]
    public enum eCommunicationType
    {
        TCP客户端 = 0,//客户端
        TCP服务器 = 1,//服务端
        UDP通讯 = 2,//udp
        串口通讯 = 3,//串口
    }

    /// <summary>
    /// PLC int数据宽度
    /// </summary>
    [Serializable]
    public enum PLCDataWriteReadTypeEnum
    {
        布尔 = 0,
        整型 = 1,
        浮点 = 2,
        字符串 = 3,
    }

    /// <summary>
    /// 通信类型
    /// </summary>
    [Serializable]
    public enum PLCType
    {
        ModbusRtu = 0,
        ModbusTCP = 1,
    }

    /// <summary>
    /// ROI类型
    /// </summary>
    [Serializable]
    public enum ROITypeEnum
    {
        全图,
        矩形,
        圆环,
        圆,
        折线段
    }
}
